import Taro, {Component, Config} from "@tarojs/taro";
import {View, Input, Picker, Image, Text} from "@tarojs/components";
import PageFooterInfo from '../../components/PageFooterInfo'
import {AtImagePicker} from 'taro-ui'
import './index.less'
import right from '../../assets/img/right.png'
import point_on from '../../assets/img/icon_23.png'
import line_on from '../../assets/img/icon_24.png'
import point from '../../assets/img/icon_25.png'
import line from '../../assets/img/icon_26.png'
import add from '../../assets/img/icon_27.png'
import img_up from '../../assets/img/img_02.jpg'
import {getRuntime} from "../../utils/common";


// 工商服务中心-报税、年检、注销-年检
class Page1 extends Component {
  constructor(props) {
    super(props)
  }

  componentWillMount(): void {
    Taro.setNavigationBarTitle({title: '公路安全达标'})
  }

  handelRouter(url: string = '/pages/index/index'): void {
    getRuntime().navigateTo(url)
  }

  onChangeImg() {}

  render() {
    return (
      <View className='from-wrap'>
        <View className='item-group pt0 pb0'>
          <View className='input-group'>
            <View className='input-name'>公司名称</View>
            <Input className='from-input' placeholderClass='placeholder_class' placeholder='请填写公司名称'/>
          </View>
          <View className='input-group '>
            <View className='input-name'>经营范围</View>
            <Picker className='input-picker' mode='selector' range={this.state.selector} onChange={this.onChange}>
              <View className='tt'>
                <View className='from-input picker-con' >点击选择</View>
                <Image className='drop-down-icon' src={right}/>
              </View>
            </Picker>
          </View>
          <View className='input-group '>
            <View className='input-name'>申请类别</View>
            <Picker className='input-picker' mode='selector' range={this.state.selector} onChange={this.onChange}>
              <View className='tt'>
                <View className='from-input picker-con' >点击选择</View>
                <Image className='drop-down-icon' src={right}/>
              </View>
            </Picker>
          </View>
          <View className='input-group '>
            <View className='input-name'>申请等级</View>
            <Picker className='input-picker' mode='selector' range={this.state.selector} onChange={this.onChange}>
              <View className='tt'>
                <View className='from-input picker-con' >点击选择</View>
                <Image className='drop-down-icon' src={right}/>
              </View>
            </Picker>
          </View>
          <View className='input-group input-upload'>
            <View className='input-name'>上传营业执照</View>
            <AtImagePicker
              length={3}
              count={3}
              showAddBtn={true}
              files={this.state.files}
              onChange={this.onChangeImg.bind(this)}
            />
          </View>
          <View className='input-group input-upload'>
            <View className='input-name'>上传法人身份证正反面</View>
            <AtImagePicker
              length={3}
              count={3}
              showAddBtn={true}
              files={this.state.files}
              onChange={this.onChangeImg.bind(this)}
            />
          </View>
        </View>

        <View className='item-group pt0 pb0'>
          <View className='input-group'>
            <View className='input-name'>联系人</View>
            <Input className='from-input' name='contactsName' placeholderClass='placeholder_class' placeholder='请填写联系人' />
          </View>
          <View className='input-group'>
            <View className='input-name'>联系电话</View>
            <Input className='from-input' type={"number"} maxLength={11} name='phoneNumnber' placeholderClass='placeholder_class' placeholder='请填写联系电话' />
          </View>
          <View className='input-group'>
            <View className='input-name'>联系邮箱</View>
            <Input className='from-input' name='emailAddress' placeholderClass='placeholder_class' placeholder='请填写联系邮箱' />
          </View>
          <View className='input-group'>
            <View className='input-name'>联系地址</View>
            <Input className='from-input' name='address' placeholderClass='placeholder_class' placeholder='请填写联系地址' />
          </View>
        </View>

        <PageFooterInfo />

        <View className='page-submit' onClick={this.handelRouter.bind(this, '/pages/business/business_success')}>立即预约办理</View>
      </View>
    )
  }
}

export default Page1
